package com.usd.trans;

import java.io.IOException;
import java.util.Enumeration;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.beanutils.BeanUtils;

/**
 * Servlet implementation class PayAction
 */
@WebServlet("/PayAction")
public class PayAction extends HttpServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * @see HttpServlet#service(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	
		try {
			request.setCharacterEncoding("utf-8");
		} catch (Exception e1) {
			// 
			e1.printStackTrace();
		}
		if(request != null) {
			String totalmoney=null;
			//String totalmoney =request.getParameter("totalmoney");
			 totalmoney =request.getParameter("beanPrice");
			//totalmoney =request.getParameter("beanPrice1");
			
			//System.out.println("获得的属性"+totalmoney);
			//第二种方法
			/*Enumeration<String> paramNames = request.getParameterNames();
			System.out.println(paramNames.hasMoreElements());
			while (paramNames.hasMoreElements()) {
				// 取出当前遍历的元素对象:当前的表单的name属性值
				String strName = paramNames.nextElement();
				System.out.println("第二种方法获取请求的东西"+strName);
			}*/
			
			//request.getRequestDispatcher("WEB-INF/logined/pay.jsp").forward(request, response);
			
		}else {
			System.out.println("空");
		}
		
	}

}
